package com.example.zlpermissionservice.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.zlpermissionservice.entity.RoleResource;
import com.example.zlpermissionservice.mapper.RoleResourceMapper;
import com.example.zlpermissionservice.service.IRoleResourceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author zhenliu（孙凌岳）
 * @Description AI生成
 * @Date 2025/6/17 21:17
 * @Version 1.0
 */
@Service
public class RoleResourceServiceImpl extends ServiceImpl<RoleResourceMapper, RoleResource> implements IRoleResourceService {
    /**
     * 根据角色id删除角色资源信息
     * @param id
     * @return
     */
    @Override
    public Boolean deleteRoleResourceByRoleId(Long id) {
        return lambdaUpdate()
                .eq(RoleResource::getRoleId, id)
                .remove();
    }
}